<?php
$connect=mysqli_connect("www.20.com","root","root");
mysqli_set_charset($connect,"utf8");
if(!$connect){
	die("连接数据库服务器失败:".mysqli_connect_error()."<br>");
}

$sql_database="create database if not exists book";
if (mysqli_query($connect,$sql_database)){
	echo "数据库创建成功！";
}
else
	echo "数据库创建失败！";

$conncet1=mysqli_select_db($connect,"book");
if(!$conncet1){
	echo "连接数据库失败".mysqli_error($connect);
}
?>